package apache.numberutil;

import org.apache.commons.lang.math.NumberUtils;

/**
 * Created by IntelliJ IDEA.
 * User: liuliwei
 * Date: 2017-06-03
 * Time: 下午1:38
 *
 * apache numberutil 测试
 */
public class NumberUtilTest {



    public static void main(String[] args) {
        System.out.println("Test:1 Integer a=null");
        Integer a = null;
        int transferA = NumberUtils.toInt(String.valueOf(a));
        System.out.println("int transfer="+transferA);

        System.out.println("Test: 2 String notNumber=not number");
        String notNumber = "notNumber";
        int transferNotNumber = NumberUtils.toInt(notNumber);
        System.out.println("int transferNotNumber="+transferNotNumber);


    }
}
